package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.DepRate;
import com.zygh.policeasset.pojo.GetReportCount;
import com.zygh.policeasset.pojo.Report;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.JdbcType;

@Mapper
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/ExcelMapper.class */
public interface ExcelMapper {
    @Select({"<script>", " SELECT '基础' AS type, p.project_no,p.name,a.section_name ,  COUNT(*) AS SUM, COUNT(CASE WHEN asset_type='jc2' THEN asset_type END) AS number1, COUNT(CASE WHEN asset_type='jc3' THEN asset_type END) AS number2, COUNT(CASE WHEN asset_type='jc4' THEN asset_type END) AS number3  FROM   `assets_basics` a LEFT JOIN assets_id_type ai ON a.id = ai.asset_id LEFT JOIN project p ON p.project_no = a.build_num <where>  ai.steps_id = -1 <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and #{startTime} &lt;= ai.do_time and ai.do_time &lt;= #{endTime}</if></where> GROUP BY p.name,a.section_name order BY p.project_no </script>"})
    @Results({@Result(column = "project_no", property = "projectNo", jdbcType = JdbcType.VARCHAR), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR)})
    List<Report> getReportCountJc(@Param("startTime") String str, @Param("endTime") String str2);

    @Select({"<script>", " SELECT  p.NAME,  a.section_name,  COUNT( CASE WHEN alc.cycle_type = 0 THEN alc.cycle_type END ) AS number1,  COUNT( CASE WHEN alc.cycle_type = 1 THEN alc.cycle_type END ) AS number2,  COUNT( CASE WHEN alc.cycle_type = 2 THEN alc.cycle_type END ) AS number3,  COUNT( CASE WHEN alc.cycle_type = 3 THEN alc.cycle_type END ) AS number4,  COUNT( CASE WHEN alc.cycle_type =- 1 THEN alc.cycle_type END ) AS number5 FROM  assets_life_cycle alc   LEFT JOIN assets a ON a.id = alc.assets_id LEFT JOIN project p ON a.build_num = p.project_no  <where>  p.category = #{category}   AND p.pid != 0   AND a.asset_approval_status = 2  <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and alc.create_time BETWEEN #{startTime}  and p.NAME is not null AND #{endTime} </if></where> GROUP BY p.NAME,a.section_name order BY p.project_no </script>"})
    @Results({@Result(column = "project_no", property = "projectNo", jdbcType = JdbcType.VARCHAR), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR)})
    List<GetReportCount> getReportCountZn(@Param("startTime") String str, @Param("endTime") String str2, @Param("category") Integer num);

    @Select({"<script>", " SELECT  p.project_no,p.name,a.section_name,a.section_id  FROM   `assets_basics` a LEFT JOIN assets_id_type ai ON a.id = ai.asset_id LEFT JOIN project p ON p.project_no = a.build_num <where>  ai.steps_id = -1 <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and #{startTime} &lt;= ai.do_time and ai.do_time &lt;= #{endTime}</if></where> GROUP BY p.name,a.section_name order BY p.project_no </script>"})
    @Results({@Result(column = "project_no", property = "projectNo", jdbcType = JdbcType.VARCHAR), @Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR), @Result(column = "section_id", property = "sectionId", jdbcType = JdbcType.INTEGER)})
    List<Report> getReportJc(@Param("startTime") String str, @Param("endTime") String str2);

    @Select({"<script>", "SELECT  p.project_no,  p.NAME  FROM project p WHERE p.start_provision_date between #{startTime} and #{endTime}  and pid != 0 and category =4 </script>"})
    @Results({@Result(column = "project_no", property = "projectNo", jdbcType = JdbcType.VARCHAR), @Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR), @Result(column = "section_id", property = "sectionId", jdbcType = JdbcType.INTEGER)})
    List<Report> getReportCg(@Param("startTime") String str, @Param("endTime") String str2);

    @Select({"<script>", "SELECT  se.project_no,  se.section_id,   p.NAME,  s.section_name  FROM  settlement se  LEFT JOIN project p  on p.project_no = se.project_no   LEFT JOIN section s on s.id = se.section_id  WHERE se.start_provision_date between #{startTime} and #{endTime}  and pid != 0 and category =#{category}</script>"})
    @Results({@Result(column = "project_no", property = "projectNo", jdbcType = JdbcType.VARCHAR), @Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR), @Result(column = "section_id", property = "sectionId", jdbcType = JdbcType.INTEGER)})
    List<Report> getReportZnhw(@Param("startTime") String str, @Param("endTime") String str2, @Param("category") Integer num);

    @Select({"<script>", " SELECT  p.project_no,p.name,a.section_name,a.section_id  FROM   `assets_softwit` a LEFT JOIN assets_id_type ai ON a.id = ai.asset_id LEFT JOIN project p ON p.project_no = a.build_num <where>  ai.steps_id = -1 <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and #{startTime} &lt;= ai.do_time and ai.do_time &lt;= #{endTime}</if></where> GROUP BY p.name,a.section_name order BY p.project_no </script>"})
    @Results({@Result(column = "project_no", property = "projectNo", jdbcType = JdbcType.VARCHAR), @Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR), @Result(column = "section_id", property = "sectionId", jdbcType = JdbcType.INTEGER)})
    List<Report> getReportZnsw(@Param("startTime") String str, @Param("endTime") String str2);

    @Select({"<script>", " SELECT  p.NAME,  '' as section_name,  COUNT( CASE WHEN alc.cycle_type = 0 THEN alc.cycle_type END ) AS number1,  COUNT( CASE WHEN alc.cycle_type = 1 THEN alc.cycle_type END ) AS number2,  COUNT( CASE WHEN alc.cycle_type = 2 THEN alc.cycle_type END ) AS number3,  COUNT( CASE WHEN alc.cycle_type = 3 THEN alc.cycle_type END ) AS number4,  COUNT( CASE WHEN alc.cycle_type =- 1 THEN alc.cycle_type END ) AS number5 FROM  assets_life_cycle alc   LEFT JOIN assets a ON a.id = alc.assets_id LEFT JOIN project p ON a.build_num = p.project_no  <where>  p.category = 4   and p.pid != 0   and a.asset_approval_status = 2  <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'> and alc.create_time BETWEEN #{startTime}   and #{endTime}  and p.NAME  is not null</if></where> GROUP BY p.NAME,a.section_name order BY p.project_no </script>"})
    @Results({@Result(column = "project_no", property = "projectNo", jdbcType = JdbcType.VARCHAR), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR)})
    List<GetReportCount> getReportCountCg(@Param("startTime") String str, @Param("endTime") String str2);

    @Select({"<script>", " SELECT  d.project_name as name,  '' as section_name,  COUNT( CASE WHEN alc.cycle_type = 0 THEN alc.cycle_type END ) AS number1,  COUNT( CASE WHEN alc.cycle_type = 1 THEN alc.cycle_type END ) AS number2,  COUNT( CASE WHEN alc.cycle_type = 2 THEN alc.cycle_type END ) AS number3,  COUNT( CASE WHEN alc.cycle_type = 3 THEN alc.cycle_type END ) AS number4,  COUNT( CASE WHEN alc.cycle_type =-1 THEN alc.cycle_type END ) AS number5 FROM  assets_life_cycle alc  LEFT JOIN assets a ON a.id = alc.assets_id  LEFT JOIN daily_project d ON a.build_num = d.id   <where>    a.assets_type = 'da' and  a.asset_approval_status = 2  <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and alc.create_time BETWEEN #{startTime}   AND #{endTime}  and d.project_name  is not null</if></where> GROUP BY d.project_name order BY d.id </script>"})
    @Results({@Result(column = "project_no", property = "projectNo", jdbcType = JdbcType.VARCHAR), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR)})
    List<GetReportCount> getReportCountDa(@Param("startTime") String str, @Param("endTime") String str2);

    @Select({"<script>", "SELECT  d.id as project_no,  d.project_name as name  FROM daily_project d WHERE start_provision_date between #{startTime} and #{endTime} </script>"})
    @Results({@Result(column = "project_no", property = "projectNo", jdbcType = JdbcType.VARCHAR), @Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR), @Result(column = "section_id", property = "sectionId", jdbcType = JdbcType.INTEGER)})
    List<Report> getReportDa(@Param("startTime") String str, @Param("endTime") String str2);

    @Select({"<script>SELECT p.name,h.section_name,h.name as assetName,h.combined as money,h.start_provision_date,h.depreciation_year FROM assets h JOIN project p ON h.build_num = p.project_no LEFT JOIN settlement se ON h.section_id = se.section_id <where> <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and h.start_provision_date between #{startTime} and  #{endTime} </if><if test='annualReport != null and annualReport.length &gt; 0 '>and  h.start_provision_date LIKE CONCAT(#{annualReport},'%')  </if><if test='dataLabelsId != null '>and  h.data_labels_id = #{dataLabelsId}  </if>and h.assets_status>-1 and h.asset_approval_status = 2 and h.assets_type = 'znh' </where>ORDER BY p.name,h.id</script>"})
    @Results({@Result(property = "projectName", column = "name", jdbcType = JdbcType.VARCHAR), @Result(property = "stop_time", column = "start_provision_date", jdbcType = JdbcType.VARCHAR), @Result(property = "assetName", column = "assetName", jdbcType = JdbcType.VARCHAR), @Result(property = "statusNum", column = "assets_status", jdbcType = JdbcType.VARCHAR), @Result(property = "money", column = "money", jdbcType = JdbcType.INTEGER), @Result(property = "depreciationYear", column = "depreciation_year", jdbcType = JdbcType.INTEGER), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR)})
    List<DepRate> getDepRateZnh(@Param("startTime") String str, @Param("endTime") String str2, @Param("annualReport") String str3, @Param("dataLabelsId") Integer num);

    @Select({"<script>SELECT p.name,h.section_name,h.name as assetName,h.combined as money,h.start_provision_date,h.depreciation_year FROM assets h JOIN project p ON h.build_num = p.project_no LEFT JOIN settlement se ON h.section_id = se.section_id <where> <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and h.start_provision_date between #{startTime} and  #{endTime} </if><if test='annualReport != null and annualReport.length &gt; 0 '>and  h.start_provision_date LIKE CONCAT(#{annualReport},'%')  </if><if test='dataLabelsId != null '>and  h.data_labels_id = #{dataLabelsId}  </if>and h.assets_status>-1 and h.asset_approval_status = 2 and h.assets_type = 'zns' </where>ORDER BY p.name,h.id</script>"})
    @Results({@Result(property = "projectName", column = "name", jdbcType = JdbcType.VARCHAR), @Result(property = "stop_time", column = "start_provision_date", jdbcType = JdbcType.VARCHAR), @Result(property = "assetName", column = "assetName", jdbcType = JdbcType.VARCHAR), @Result(property = "statusNum", column = "assets_status", jdbcType = JdbcType.VARCHAR), @Result(property = "money", column = "money", jdbcType = JdbcType.INTEGER), @Result(property = "depreciationYear", column = "depreciation_year", jdbcType = JdbcType.INTEGER), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR)})
    List<DepRate> getDepRateZns(@Param("startTime") String str, @Param("endTime") String str2, @Param("annualReport") String str3, @Param("dataLabelsId") Integer num);

    @Select({"<script>SELECT p.name,h.section_name,h.name as assetName,h.combined as money,h.start_provision_date,h.depreciation_year FROM assets h JOIN project p ON h.build_num = p.project_no LEFT JOIN settlement se ON h.section_id = se.section_id <where> <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and h.start_provision_date between #{startTime} and  #{endTime} </if><if test='annualReport != null and annualReport.length &gt; 0 '>and  h.start_provision_date LIKE CONCAT(#{annualReport},'%')  </if><if test='dataLabelsId != null '>and  h.data_labels_id = #{dataLabelsId}  </if>and h.assets_status>-1 and h.asset_approval_status = 2 and h.assets_type = 'jc' </where>ORDER BY p.name,h.id</script>"})
    @Results({@Result(property = "projectName", column = "name", jdbcType = JdbcType.VARCHAR), @Result(property = "stop_time", column = "start_provision_date", jdbcType = JdbcType.VARCHAR), @Result(property = "assetName", column = "assetName", jdbcType = JdbcType.VARCHAR), @Result(property = "statusNum", column = "assets_status", jdbcType = JdbcType.VARCHAR), @Result(property = "money", column = "money", jdbcType = JdbcType.INTEGER), @Result(property = "depreciationYear", column = "depreciation_year", jdbcType = JdbcType.INTEGER), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR)})
    List<DepRate> getDepRateJc(@Param("startTime") String str, @Param("endTime") String str2, @Param("annualReport") String str3, @Param("dataLabelsId") Integer num);

    @Select({"<script>SELECT p.name,h.name as assetName,h.combined as money,h.start_provision_date,h.depreciation_year  FROM  assets h left JOIN project p  ON h.build_num = p.project_no  <where>  <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and h.start_provision_date between #{startTime} and  #{endTime} </if><if test='annualReport != null and annualReport.length &gt; 0 '>and  h.start_provision_date LIKE CONCAT(#{annualReport},'%')  </if><if test='dataLabelsId != null '>and  h.data_labels_id = #{dataLabelsId}  </if>and h.assets_status>-1 and h.asset_approval_status = 2 and h.assets_type = 'cg' </where>ORDER BY p.name,p.id</script>"})
    @Results({@Result(property = "projectName", column = "name", jdbcType = JdbcType.VARCHAR), @Result(property = "stop_time", column = "start_provision_date", jdbcType = JdbcType.VARCHAR), @Result(property = "assetName", column = "assetName", jdbcType = JdbcType.VARCHAR), @Result(property = "statusNum", column = "assets_status", jdbcType = JdbcType.VARCHAR), @Result(property = "money", column = "money", jdbcType = JdbcType.INTEGER), @Result(property = "depreciationYear", column = "depreciation_year", jdbcType = JdbcType.INTEGER), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR)})
    List<DepRate> getDepRateCg(@Param("startTime") String str, @Param("endTime") String str2, @Param("annualReport") String str3, @Param("dataLabelsId") Integer num);

    @Select({"<script>SELECT da.project_name as name,h.name as assetName,h.combined as money,h.start_provision_date,h.depreciation_year  FROM  assets h LEFT JOIN `daily_project` da ON h.`build_num` = da.id <where>  <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and h.start_provision_date between #{startTime} and  #{endTime} </if><if test='annualReport != null and annualReport.length &gt; 0 '>and  h.start_provision_date LIKE CONCAT(#{annualReport},'%')  </if><if test='dataLabelsId != null '>and  h.data_labels_id = #{dataLabelsId}  </if>and h.assets_status>-1 and h.asset_approval_status = 2 and h.assets_type = 'da' </where>ORDER BY h.pact_name,da.id</script>"})
    @Results({@Result(property = "projectName", column = "name", jdbcType = JdbcType.VARCHAR), @Result(property = "stop_time", column = "start_provision_date", jdbcType = JdbcType.VARCHAR), @Result(property = "assetName", column = "assetName", jdbcType = JdbcType.VARCHAR), @Result(property = "statusNum", column = "assets_status", jdbcType = JdbcType.VARCHAR), @Result(property = "money", column = "money", jdbcType = JdbcType.INTEGER), @Result(property = "depreciationYear", column = "depreciation_year", jdbcType = JdbcType.INTEGER), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR)})
    List<DepRate> getDepRateDa(@Param("startTime") String str, @Param("endTime") String str2, @Param("annualReport") String str3, @Param("dataLabelsId") Integer num);

    @Select({"<script>SELECT p.name as projectName,b.section_name as sectionName,b.basics_name as assetName,b.start_money as money,b.number,b.start_provision_date as stop_time,b.depreciation_period as depreciationYear FROM assets_basics b JOIN project p ON b.build_num = p.project_no LEFT JOIN settlement se ON b.section_id = se.section_id  <where> <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and #{startTime} &lt;= b.start_provision_date and b.start_provision_date &lt;= #{endTime} </if><if test='dataLabelsId != null '>and  b.data_labels_id = #{dataLabelsId}  </if><if test='assetsClassificationId != null '>and  b.assets_classification_id = #{assetsClassificationId}  </if><if test='assetsClassificationPid != null '>and  b.assets_classification_pid = #{assetsClassificationPid}  </if></where>UNION ALL SELECT p.name as projectName,h.section_name as sectionName,h.facility_name as assetName,h.start_money as money,1,h.start_provision_date as stop_time,h.depreciation_period as depreciationYear FROM assets_hardwit h JOIN project p ON h.build_num = p.project_no LEFT JOIN settlement se ON h.section_id = se.section_id  <where> <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and #{startTime} &lt;= h.start_provision_date and h.start_provision_date  &lt;= #{endTime} </if><if test='dataLabelsId != null '>and  h.data_labels_id = #{dataLabelsId}  </if><if test='assetsClassificationId != null '>and  h.assets_classification_id = #{assetsClassificationId}  </if><if test='assetsClassificationPid != null '>and  h.assets_classification_pid = #{assetsClassificationPid}  </if></where>UNION ALL SELECT p.name as projectName,s.section_name as sectionName,s.softwit_name as assetName,s.start_money as money,1,s.start_provision_date as stop_time,s.depreciation_period as depreciationYear FROM assets_softwit s JOIN project p ON s.build_num = p.project_no LEFT JOIN settlement se ON s.section_id = se.section_id  <where> <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and #{startTime} &lt;= s.start_provision_date and s.start_provision_date &lt;= #{endTime} </if><if test='dataLabelsId != null '>and  s.data_labels_id = #{dataLabelsId}  </if><if test='assetsClassificationId != null '>and  s.assets_classification_id = #{assetsClassificationId}  </if><if test='assetsClassificationPid != null '>and  s.assets_classification_pid = #{assetsClassificationPid}  </if></where>UNION ALL SELECT p.name as projectName,'无',pu.purchase_name as assetName,pu.money as money,1,pu.start_provision_date as stop_time,pu.depreciation_year as depreciationYear FROM project p   JOIN purchase pu ON pu.project_no = p.project_no   JOIN processrecord pr ON p.id = pr.project_id   <where> <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and #{startTime} &lt;= pu.start_provision_date and pu.start_provision_date &lt;= #{endTime} </if><if test='assetsClassificationId != null '>and  pu.assets_classification_id = #{assetsClassificationId}  </if><if test='assetsClassificationPid != null '>and  pu.assets_classification_pid = #{assetsClassificationPid}  </if><if test='dataLabelsId != null '>and  pu.data_labels_id = #{dataLabelsId}  </if> AND pr.process_name = 'cg'</where>UNION ALL SELECT da.project_name as projectName,'无',a.basics_name as assetName,a.start_money as money,a.number,a.start_provision_date as stop_time,a.plan_year as depreciationYear FROM `daily_asset` a LEFT JOIN `daily_project` da ON a.`build_num` = da.id  <where> <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and #{startTime} &lt;= a.start_provision_date and a.start_provision_date &lt;= #{endTime} </if><if test='dataLabelsId != null '>and  a.data_labels_id = #{dataLabelsId}  </if><if test='assetsClassificationId != null '>and  a.assets_classification_id = #{assetsClassificationId}  </if><if test='assetsClassificationPid != null '>and  a.assets_classification_pid = #{assetsClassificationPid}  </if> </where> ORDER BY projectName</script>"})
    List<DepRate> getDepRate(@Param("startTime") String str, @Param("endTime") String str2, @Param("dataLabelsId") Integer num, @Param("assetsClassificationId") Integer num2, @Param("assetsClassificationPid") Integer num3);

    @Select({"<script>SELECT a.id,a.name as assetName,a.combined as money,a.start_provision_date as startProvisionDate,a.depreciation_year as depreciationYear,a.assets_type as assetsType,a.build_num as buildNum,a.section_id as sectionId,a.witbig_name as witbigName,a.witsmall_name as witsmallName FROM assets a  <where> <if test='startTime != null and startTime.length &gt; 0 and endTime != null and endTime.length &gt; 0'>and a.start_provision_date between #{startTime} and #{endTime} </if><if test='dataLabelsId != null '>and  a.data_labels_id = #{dataLabelsId}  </if><if test='assetsClassificationId != null '>and  a.assets_classification_id = #{assetsClassificationId}  </if><if test='assetsClassificationPid != null '>and  a.assets_classification_pid = #{assetsClassificationPid}  </if> and  a.assets_status > -1</where>ORDER BY name</script>"})
    List<DepRate> getDepRateNew(@Param("startTime") String str, @Param("endTime") String str2, @Param("dataLabelsId") Integer num, @Param("assetsClassificationId") Integer num2, @Param("assetsClassificationPid") Integer num3, @Param("condition") Integer num4);
}